﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Commerce.Data;

namespace Commerce.CSK.Web.Controls
{
    public partial class MiniCart : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cartImageLink.ImageUrl = Links.GetStaticImagePath("cart.gif");
            this.cartImageLink.NavigateUrl = Links.GetCartViewLink(); 
        }
        protected void Page_PreRender(object sender, EventArgs e)
        {
            Order currentOrder = Services.GetCurrentOrder();

            this.cartItemCount.Text = currentOrder.TotalItemQuantity.ToString();

        }
        
    }
}